<?php require_once('../../core/import.php');?>
<?php User::Permission('ACCOUNT_DELETE'); ?>
<?php
    if($_SERVER['REQUEST_METHOD']=='POST')
    {        
        #遍历
        foreach(@Functions::FormArgs('ID') as $Value)
        {
           //删除记录将添加至回收站
		 if($Data=DB::GetRowByID('account',$Value))
		  {
			DB::Insert('account_delete',array
				(
					'Account'=>$Data['Username'],
					'Datetime'=>date('Y-m-d G:i:s')
				));
		  }
        }

        #转向
        Functions::JsLocation($_SERVER['HTTP_REFERER']);
    }
?>